<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <header>
        <div class="div">

        </div>
    </header>
    <nav>
        <div class="div">

        </div>
    </nav>
    <nav class="s">
        <div class="div1">

        </div>
    </nav>

</body>

</html>
<style>
    header {
        height: 200px;
        background: red;
        text-align: center;
    }

    header .div {
        width: 200px;
        height: 200px;
        background: pink;
        display: inline-block;
    }

    nav {
        height: 200px;
        background: blue;

    }

    nav .div {
        margin: auto;
        width: 200px;
        height: 200px;
        background: pink;
    }

    .s {
        height: 200px;
        background: yellow;
        position: relative;

    }

    .div1 {
        position: absolute;
        left: 50%;
        width: 200px;
        height: 200px;
        background: pink;
        transform: translate(-50%, 0);
    }
</style>